package FurnitureFactory

type IStyle interface {
	getStyleName() string
}

type ArtDeco struct{ IStyle }
type Modern struct{ IStyle }
type Victorian struct{ IStyle }

func (style *ArtDeco) getStyleName() string {
	return "艺术装饰风"
}

func (style *Modern) getStyleName() string {
	return "现代风"
}

func (style *Victorian) getStyleName() string {
	return "维多利亚风"
}

func StyleFactory(styleName string) IStyle {
	if styleName == "ArtDeco" {
		return &ArtDeco{}
	} else if styleName == "Modern" {
		return &Modern{}
	} else if styleName == "Victorian" {
		return &Victorian{}
	}
	return nil
}
